/*
 * Copyright (c) 2008-2013 Haulmont. All rights reserved.
 * Use is subject to license terms, see http://www.cuba-platform.com/license for details.
 */

package com.haulmont.asu.entity;

import com.haulmont.chile.core.annotations.NamePattern;

import javax.persistence.*;

/**
 * Author: Sergey42
 * Date: 14.10.13 12:05
 */
@Table(name = "EXT_CATHEDRAL_EMPLOYEE")
@Entity(name = "ext$CathedralEmployee")
@DiscriminatorValue("E")
@PrimaryKeyJoinColumn(name = "PERSON_ID", referencedColumnName = "ID")
@NamePattern("%s|name")
public class CathedralEmployee extends Person {

    private static final long serialVersionUID = -7862245295891702014L;

    @ManyToOne
    @JoinColumn(name = "CATHEDRA_ID")
    protected Cathedra cathedra;

    @ManyToOne
    @JoinColumn(name = "SCIENCE_GRADE_ID")
    protected ScienceGrade scienceGrade;

    @ManyToOne
    @JoinColumn(name = "POSITION_ID")
    protected Position position;

    public Cathedra getCathedra() {
        return cathedra;
    }

    public void setCathedra(Cathedra cathedra) {
        this.cathedra = cathedra;
    }

    public ScienceGrade getScienceGrade() {
        return scienceGrade;
    }

    public void setScienceGrade(ScienceGrade scienceGrade) {
        this.scienceGrade = scienceGrade;
    }

    public Position getPosition() {
        return position;
    }

    public void setPosition(Position position) {
        this.position = position;
    }
}
